﻿@using Cloud.Entity;
@model List<Cloud.Dto.SysUserDto>
@{
    Layout = "~/Views/Shared/InitPagedInputControls.cshtml";
}
<table class="table  table-bordered table-hover tableFocus center">

    <thead>
        <tr>
            <th>登录名</th>
            <th>手机号</th>
            <th>超级管理员</th>
            <th>角色</th>
            <th>操作</th>


        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model)
        {

        <tr>
            <td>@item.LoginName</td>
            <td>@item.Phone</td>
            <td>
                @{
                    if (item.IsAdmin)
                    {
                        <span class="label label-success">是</span>

                    }
                    else
                    {

                        <span class="label">否</span>
                    }
                }
            </td>
            <td>
                @foreach (var role in item.RoleList)
                {
                    <span class="label label-success">@role.RoleName</span>

                }
            </td>

			<td>
				<span class="btn btn-xs  btn-info popupEdit" title="编辑操作" call-type="edit" call-url="@Url.Action("Edit",new { id=item.LoginID})" callback-url="@Url.Action("PagedList")">
					<i class="fa fa-pencil-square-o"></i>编辑
				</span>
				<span class="btn btn-xs  btn-info goSecondPage" title=""  call-url="@Url.Action("Detail",new { id=item.LoginID})" callback-url="@(Url.Action("Manager")+ViewBag.queryParas)">
					<i class="fa fa-asterisk"></i>详情
				</span>
				<span class="btn btn-xs  btn-danger popupConfirm" title="确定要删除吗?" call-url="@Url.Action("Delete",new { id=item.LoginID})" callback-url="@Url.Action("PagedList")">
					<i class="fa fa-trash-o"></i>删除
				</span>

			</td>
        </tr>
        }
    </tbody>

</table>

